package chapter4.No4_1_使用reentrantLock类.demo14;

import java.util.concurrent.locks.ReentrantLock;

/**
 * Created by Administrator on 2016/11/22.
 */
public class ServiceClass3 {
    ReentrantLock lock = new ReentrantLock();

    public void methodA() {
        System.out.println(lock.isLocked());
        lock.lock();
        System.out.println(lock.isLocked());
        lock.unlock();
    }
}
